-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added filter transactions by chain #1834
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like build is failing, so only leaving comments for now. As we are filtering data client side, will need to see how this affects pagination logic (we likely display less results than what we fetched).
Any chance this chain filtering can be done on blockchain api level vs on client?
…onent update call
filterByConnectedChain(transactions: Transaction[]) { | ||
const chainId = NetworkController.state.caipNetwork?.id | ||
const filteredTransactions = transactions.filter( | ||
transaction => transaction.metadata.chain === chainId | ||
) | ||
|
||
return filteredTransactions | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were requesting the filtered txs directly from blockchain api 🤔
wouldn't this mess up with pagination?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this mess up with pagination?
Mmm I'm not sure and I'm not able to test this 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geekbrother any way we can do the filterin directly on blockchain API side? I think there's an edge case to this where if we filter txs and don't have enough to fill the ui, we will never request more txs even if you have them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can filter it on the blockchain-api side and even request the filtered data from the provider.
I created an issue reown-com/blockchain-api#540 to track it and ping you when it's ready.
<wui-flex | ||
flexDirection="column" | ||
class="group-container" | ||
last-group="${isLastGroup ? 'true' : 'false'}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use strings?
if neded, we can do String(isLastGroup)
Breaking Changes
Changes